package com.vf.admin.platform.service.impl;

import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.platform.dao.OrganDao;
import com.vf.admin.platform.entity.Organ;
import com.vf.admin.platform.service.OrganService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class OrganServiceImpl  implements OrganService {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());
    @Autowired
    private OrganDao organDao;

    /**
     * 保存或者更新
     * @return
     */
    public void saveOrUpdate(Organ organ){
        organDao.saveOrUpdate(organ);
    }

    @Override
    public List getOrgAllList() {
        return organDao.getOrgAllList();
    }

    //详情
    public Organ get(Integer id){
        return organDao.get(id);
    }

    //列表查询
    public List<Organ> findList(Map<String,Object> paraMap, SplitPageBean splitPage){
        return organDao.findList(paraMap);
    }
    /**
     * 删除
     */
    public void del(int id){
        organDao.del(id);
    }
}
